package com.souku.finance.application.http.volley;

import android.app.Activity;

import com.souku.finance.application.utils.Constant;
import com.souku.finance.application.utils.ShareUtil;

/**
 * Created by Android on 2017/1/5.
 */

public class ServiceTimeHelper {

    private Activity context;

    public ServiceTimeHelper(Activity context) {
        this.context = context;
    }

    //获取服务器时间
    public void getTime() {
        String time = System.currentTimeMillis() + "";
        ShareUtil.getInstance().putExtra(Constant.Servertime, time);
//        RequestManager.getInstance().get(UrlConstact.TIME_STAMP, new RequestManager.RequestListener() {
//            @Override
//            public void onRequest() {
//
//            }
//
//            @Override
//            public void onSuccess(String response, Map<String, String> headers, String url, int actionId) {
//                if (JsonUtil.getCode(response) == 1) {
//                    String time = JsonUtil.getString(JsonUtil.getData(response), "timeStamp");
//                    ShareUtil.getInstance().putExtra(Constant.Servertime, time);
//                    Log.e("timestamp = " , time);
//                }
//            }
//
//            @Override
//            public void onError(String errorMsg, String url, int actionId) {
//
//            }
//        }, 0);
    }
}
